Xbasic

Using AI to create a UX Component

Description

Create a UX component using AI with data binding. Choose a datasource, provide a prompt informed by schema, then save and preview the generated component.

Start The UX Generator

From the Web Project Control Panel AI menu, choose the option to create a UX component.

AI menu entry for creating a UX component
AI Menu For UX

Pick Generation Mode

Select from the available options; for this example, generate against an existing datasource.

Options including generating against an existing datasource
UX AI Options

Bind To A Datasource

  1. Choose Datasource

    The binding dialog opens so you can select a datasource.

    Select a datasource for the UX
    Binding Dialog
  2. Select Tables

    Pick the table(s) you want to bind.

    Table selection for binding
    Select Tables
  3. Proceed

    With the table binding established, continue to the next step.

    Confirmation of bound tables for the UX
    Binding Confirmed

Provide The Prompt

The prompt works like a web page prompt but includes schema context and instructions on which fields to include.

Prompt dialog showing schema-informed guidance
Prompt With Schema
Prompt instructing AI to generate a customer UX
Customer UX Prompt

Review The Result

The generated UX contains a template with placeholders wired to fields.

Generated page with field placeholders
Generated UX Template

Save To Project

  1. Save the generated UX component to your project.

    Confirmation that the UX was saved
    Saved Component
  2. Load And Inspect

    Open the component to confirm fields were created and view the Freeform control.

    Loaded UX showing fields and a Freeform object
    Component Loaded
    HTML generated by AI inside the Freeform control
    Freeform Control
  3. Preview

    Preview the UX to confirm bindings and layout.

    Preview of the generated UX component
    UX Preview